package com.kaifamiao.base.Demo210815;

/**
 * @author lucien-ma
 * @date 2021/9/15
 * @apiNote
 */
public class Demo03 {
}

class Sup2{
    int x = 10;
    static int y = 20;
}
class Sub2 extends Sup2{
    int x = 11;
    static int y = 21;

    public void test(){
        System.out.println("this.x = " + this.x);
        System.out.println("super.x = " + super.x);
        System.out.println("this.y = " + this.y);
        System.out.println("Sub.y = " + Sub2.y);
        System.out.println("super.y = " + super.y);
        System.out.println("Super.y =" + Sup2.y);
    }

    public static void main(String[] args) {
        Sub2 sub = new Sub2();
        sub.test();
    }
}